<%--
  Created by IntelliJ IDEA.
  User: zjk
  Date: 2018-08-03
  Time: 21:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>竞争对手表</title>
    <title>合同列表</title>
    <link rel="shortcut icon" href="easyui/css/images/favicon.ico"/>
    <link rel="stylesheet" href="css/flipclock.css">
    <link href="css/CalcSS3.css" rel="stylesheet" type="text/css"/>
    <link href="css/index.css" rel="stylesheet" type="text/css"/>
    <link href="easyui/css/easyui.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/easyui_animation.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/easyui_plus.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/insdep_theme_default.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/icon.css" rel="stylesheet" type="text/css">
    <link href="easyui/css/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">


    <!-- 引入 ECharts 文件 -->
    <script src="js/echarts.js"></script>
    <!--放入自定义的图表-->
    <script src="js/monitor.js"></script>
    <script type="text/javascript" src="easyui/js/jquery.min.js"></script>
    <script type="text/javascript" src="easyui/js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="easyui/js/jquery.insdep-extend.min.js"></script>
    <script type="text/javascript" src="js/utils/DateFormate.js"></script>


</head>
<body>
<style>
    .by{
        padding: 10px;
        text-align: center;
    }
</style>
<!-- 引入公用表格和表单样式 -->
<link href="css/utils/utilsDatagrid.css" rel="stylesheet" type="text/css">
<link href="css/utils/utilsForm.css" rel="stylesheet" type="text/css">
<!-- 引入 详情样式-->
<link href="css/utils/utilsDetails.css" rel="stylesheet" type="text/css">
<!--引入解决方案js-->
<script type="text/javascript" src="js/before-sale/competitor.js"></script>

<div class="easyui-layout"  data-options="fit:true, border:false">
    <div data-options="region:'center'" style="padding:5px;">
        <table id="zjk-competitor-dg" class="easyui-datagrid table-chance"  data-options="fit:true,striped:true,fitColumns:true,checkOnSelect:false,
   autoRowHeight:true,nowrap:false,pagination:true,toolbar:'#zjk-competitor-tools',scrollbarSize:0,
pageList:[10,15,20,25],pageSize:10,
url:'showCompetitorList',method:'post'">
            <thead>
            <tr class="datagrid-header-row">
                <th data-options="field:'comId',width:40,align:'center',checkbox:true">ID</th>
                <th data-options="field:'comName',width:100,align:'center'">公司名称</th>
                <th data-options="field:'comPower',width:60,align:'center'">竞争能力</th>
                <th data-options="field:'comProduct',width:70,align:'center'">竞争产品</th>
                <th data-options="field:'comPrice',width:40,align:'center'">价格</th>
                <th data-options="field:'chanceId',width:50,align:'center',formatter:function(value){
							var result;
							$.ajax({
								url:'getSaleChanceThemeById',
								async:false,//改为同步请求
								type:'POST',
								data:{chId:value},
								success:function(e){
									result = e;
								}
							});
							return result;
						}">对应机会</th>
                <th data-options="field:'clientId',width:60,align:'center',formatter:function(value){
							var result;
							$.ajax({
								url:'get-client-name',
								async:false,//改为同步请求
								type:'POST',
								data:{clientId:value},
								success:function(e){
									result = e;
								}
							});
							return result;
						}">客户</th>
                <th data-options="field:'operation',width:60,align:'center'" formatter="format">操作</th>

            </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
        <!--工具栏-->
        <div id="zjk-competitor-tools">
            <a id="zjk-add-competitor-btn"  class="easyui-linkbutton"data-options="iconCls:'icon-mini_add2',plain:true">新建</a>
            <a id="zjk-competitor-tools-remove" href="#" class="easyui-linkbutton"data-options="iconCls:'icon-my_delete',plain:true">删除</a>

            <a id="zjk-competitor-tools-findAll"  class="easyui-linkbutton" data-options="iconCls:'icon-my_search',plain:true">查询所有</a>
            <input id="competitor-search" class="easyui-searchbox" style="width: 300px" data-options="menu:'#competitor-mm'"/>
            <!--搜索框菜单-->
            <div id="competitor-mm" style="width:120px">
                <div data-options="name:'comName'">公司名称</div>
                <div data-options="name:'comPower'">竞争能力</div>
                <%--<a class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-my_search'">高级查询</a>--%>
            </div>


        </div>
    </div>
</div>

//编辑窗口
<div id="zjk-competitor-add-edit-dialog" class="easyui-dialog" style="background-color:#EBEFF2;" data-options="
           title:'编辑竞争对手信息',
           modal:true,
			iconCls:'icon-save2',
			width:'50%',
			height:'85%',
			closed:true,
			href:'zjk-competitor-form',
			shadow:true,
			bodyCls:'by',
			buttons:'#zjk-competitor-add-edit-dialog-bb' "></div>
//添加窗口
<div id="zjk-competitor-add-dialog" class="easyui-dialog" style="background-color:#EBEFF2;" data-options="
           modal:true,
			iconCls:'icon-save2',
			width:'50%',
			height:'85%',
			closed:true,
			href:'zjk-add-competitor-form',
			shadow:true,
			bodyCls:'by',
			buttons:'#zjk-competitor-add-dialog-bb' "></div>

//编辑窗口按钮
<div id="zjk-competitor-add-edit-dialog-bb">
    <a href="#" id="zjk-competitor-add-edit-dialog-bb-save" class="easyui-linkbutton" data-options="iconCls:'icon-ok2'">保存</a>
    <a href="#" id="zjk-competitor-add-edit-dialog-bb-close" class="easyui-linkbutton" data-options="iconCls:'icon-cancel2',onClick:function(){
    $('#zjk-competitor-add-edit-dialog').dialog('close')}">关闭</a>
</div>
//添加窗口按钮
<div id="zjk-competitor-add-dialog-bb">
    <a href="#" id="zjk-competitor-add-dialog-bb-save" class="easyui-linkbutton" data-options="iconCls:'icon-ok2'">保存</a>
    <a href="#" id="zjk-competitor-add-dialog-bb-close" class="easyui-linkbutton" data-options="iconCls:'icon-cancel2'">关闭</a>
</div>
//详情窗口
<div id="zjk-competitor-details" class="easyui-dialog" style="background-color:#EBEFF2;" data-options="title:'竞争对手详情',modal:true,
			iconCls:'icon-save2',
			width:'50%',
			height:'90%',
			closed:true,
			href:'zjk-salePlan-details',
			shadow:true

			 "></div>


</body>
</html>
